<!--{**************************************************************************}-->
<script src="/_js/nicedit/nicEdit.js"></script>
<!--{**************************************************************************}-->
<script>
(function($){
	$.fn.nicedit = function() {
		return this.each(function(){
			$self = $(this);
			var param = {fullPanel : true,iconsPath : "/_js/nicedit/nicEditorIcons.gif",maxHeight : $self.height()};
			var editor = new nicEditor(param).panelInstance($self.attr('name'));
			$self.data('niceditor', editor.nicInstances[editor.nicInstances.length-1]);

			$.fn.save = function()
			{
				$self.data('niceditor').saveContent();
				$self.val($self.val().replace('<br>',''));
			};

		});
		return this;
	};
	$('textarea.nicedit').nicedit();
})(jQuery);
</script>